#include ".\app_cfg.h"
#ifndef __TASK_CHECK_USE_PEEK_H__
#define __TASK_CHECK_USE_PEEK_H__

#include "..\byte_queue\byte_queue.h"
#include "..\byte_adapter\byte_adapter.h"

typedef fsm_rt_t(check_agent_fn)(bool *pbRequestDrop);

typedef struct user_target_t {
    event_t *ptEvent;
    fetch_byte_fn *fnGetByte;
} user_target_t;

typedef struct check_agent_t {
    check_agent_fn *fnCheck;
    user_target_t *ptTarget;
} check_agent_t;

extern_simple_fsm(task_check_use_peek,
                  def_params(
                      byte_queue_t *ptQ;
                      bool bIsRequestDrop;
                      check_agent_t *ptTable;
                      int32_t nTableSize;
                      int32_t nCount;
                  ))

extern_fsm_initialiser(task_check_use_peek,
                       args(
                           byte_queue_t *ptQueue,
                           check_agent_t *ptTable,
                           int32_t nTableSize
                       ))

extern_fsm_implementation(task_check_use_peek)


#endif